package com.oyb.servlet;

import com.oyb.entity.Classes;
import com.oyb.service.ClassServies;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(urlPatterns = "/showupdateclassServlset")
public class ShowupdateclassServlset extends HttpServlet {

    private ClassServies classServies = new ClassServies();

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String id = req.getParameter("checknames");
        Classes classes = classServies.queryClasses(id);
        req.setAttribute("updatecalss",classes);
        req.getRequestDispatcher("updateClass.jsp").forward(req,resp);
    }
}
